package com.example.controller.war;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2020/9/20 10:43
 */
@RestController
public class PackageController {

    @Value("${spring.application.name}")
    private String name;

    // http://localhost:tomcat.port/warName/test
    //http://localhost:8080/spring-boot-package-war-1.0-SNAPSHOT/test
    @RequestMapping(value = "test")
    public String test(){
        return name;
    }
}
